# -*- coding: utf-8 -*-
def do_upgrade(env, cursor):

    try:
        cursor.execute("ALTER TABLE topic ADD status int(11) default 0")
    except:
        pass

    try:
        cursor.execute("ALTER TABLE topic ADD priority int(11) default 0")
    except:
        pass

    # Set database schema version.
    cursor.execute("UPDATE system "
                   "SET value = '5' "
                   "WHERE name = 'discussion_version'")
